package dk.dashboardFP.dfpLogger.view {
	import dk.dashboardFP.dfpLogger.DFPLoggerLevels;
	import dk.dashboardFP.shapes.Box;

	import flash.display.MovieClip;
	import flash.display.Sprite;

	/**
	 * @author josef
	 */
	public class LogItemBack extends Sprite {
		private var _doBase : Box;
		private var _intLevel : int;
		private var _doLevelAsset : MovieClip;

		public function LogItemBack(intLevel:int) {
			
			_intLevel = intLevel;
			setupElements();
		}
		
		private function setupElements() : void {
			
			//:::::::
			// base
			_doBase=new Box(10, 10, 0, 0.15);
			addChild(_doBase);
			
			//:::::::
			// level 
			if (_intLevel!=DFPLoggerLevels.INFO) {
				
				//:::::::
				// log level asset 
				_doLevelAsset=new LogLevelAsset();
				addChild(_doLevelAsset);
				
				_doLevelAsset.width=10;
				_doLevelAsset.height=10;
				
				_doLevelAsset.gotoAndStop(_intLevel);
			}
		}
	}
}
